/*
 * ICS 314 Avionics Assignment
 * @author ICS 314 Team Haines {Kevon Adonis, Alex Char, David Teroaka, Samuel Roberts}
 * @copyright 2014
 */

package avionics;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UnsupportedLookAndFeelException;

/*
 * Main menthod class that initiates and run all operational classes
 */
public class AvionicsDriver {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
	try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    try {
			javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    }
                    catch ( InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                        // I tried hahaha
                    }
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            // ooops
        }
        try {

            JFrame mainWindow = new JFrame("TEAM HAINES :: AVIONICS");

            AvionicsGUI start = new AvionicsGUI();

            JPanel application = (JPanel) start.getGui();

            mainWindow.setContentPane(application);

            mainWindow.setSize(720, 475);

            mainWindow.setVisible(true);

        } catch (SecurityException e) {

                e.printStackTrace();
        }

    }

}
